﻿package mortal.game.view.combinedServer.combinedSerDayRe1000
{
    import Message.Game.*;
    import mortal.game.cache.*;

    public class CombinedSerDayRe1000Util extends Object
    {
        public static var totalNum:int = 20;
        public static var oneNum:int = 1000;

        public function CombinedSerDayRe1000Util()
        {
            return;
        }// end function

        public static function getRwIndex() : int
        {
            var _loc_1:* = Cache.instance.combinedSer.recharge1000Info;
            if (_loc_1 == null)
            {
                return -1;
            }
            var _loc_2:* = _loc_1.recharge / oneNum;
            var _loc_3:int = 0;
            while (_loc_3 < totalNum)
            {
                
                if (_loc_2 >= (_loc_3 + 1))
                {
                    if ((_loc_3 + 1) == (_loc_1.getTimes + 1))
                    {
                        return _loc_3;
                    }
                }
                else
                {
                    return -1;
                }
                _loc_3++;
            }
            return -1;
        }// end function

    }
}
